<template>
  <div style="margin-top: 15px">
    <div style="background-color: white">
      <h1 style="text-align: center">{{essay.title}}</h1>
      <a-divider style="margin:auto"/>
      <v-md-editor :model-value="essay.content" mode="preview" v-loading="loading"></v-md-editor>
  </div>
  </div>

</template>

<script setup>
import {onMounted,  ref} from "vue";
import request from "@/utils/request";
import {useRoute} from "vue-router";

const loading=ref(false)
const route=useRoute()
const essay=ref({

})

onMounted(()=>{
  loading.value=true
  request.get("essay/get/"+route.params.essayId).then(res=>{
    console.log(res)
    essay.value=res.data
    loading.value=false
  })
})
</script>

<style scoped>

</style>